package com.rickie.dbsdk.model;

import java.io.Serializable;
import java.util.Date;

/**
 * 行程
 */
public class LegDO implements Serializable {
    /**
     *
     * 主键id
     */
    private Integer id;

    /**
     *
     * 装载时间
     */
    private Date loadTime;

    /**
     *
     * 卸载时间
     */
    private Date unloadTime;

    /**
     *
     * 装载地址id
     */
    private String loadLocationId;

    /**
     *
     * 卸载地址id
     */
    private String unloadLocationId;

    /**
     *
     * 航班编号
     */
    private String voyageNumber;

    /**
     *
     * 商品id
     */
    private Integer cargoId;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table LEG
     *
     * @mbg.generated
     */
    private static final long serialVersionUID = 1L;

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table LEG
     *
     * @mbg.generated
     */
    public LegDO(Integer id, Date loadTime, Date unloadTime, String loadLocationId, String unloadLocationId, String voyageNumber, Integer cargoId) {
        this.id = id;
        this.loadTime = loadTime;
        this.unloadTime = unloadTime;
        this.loadLocationId = loadLocationId;
        this.unloadLocationId = unloadLocationId;
        this.voyageNumber = voyageNumber;
        this.cargoId = cargoId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table LEG
     *
     * @mbg.generated
     */
    public LegDO() {
        super();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column LEG.ID
     *
     * @return the value of LEG.ID
     *
     * @mbg.generated
     */
    public Integer getId() {
        return id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column LEG.ID
     *
     * @param id the value for LEG.ID
     *
     * @mbg.generated
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column LEG.LOAD_TIME
     *
     * @return the value of LEG.LOAD_TIME
     *
     * @mbg.generated
     */
    public Date getLoadTime() {
        return loadTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column LEG.LOAD_TIME
     *
     * @param loadTime the value for LEG.LOAD_TIME
     *
     * @mbg.generated
     */
    public void setLoadTime(Date loadTime) {
        this.loadTime = loadTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column LEG.UNLOAD_TIME
     *
     * @return the value of LEG.UNLOAD_TIME
     *
     * @mbg.generated
     */
    public Date getUnloadTime() {
        return unloadTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column LEG.UNLOAD_TIME
     *
     * @param unloadTime the value for LEG.UNLOAD_TIME
     *
     * @mbg.generated
     */
    public void setUnloadTime(Date unloadTime) {
        this.unloadTime = unloadTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column LEG.load_location_id
     *
     * @return the value of LEG.load_location_id
     *
     * @mbg.generated
     */
    public String getLoadLocationId() {
        return loadLocationId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column LEG.load_location_id
     *
     * @param loadLocationId the value for LEG.load_location_id
     *
     * @mbg.generated
     */
    public void setLoadLocationId(String loadLocationId) {
        this.loadLocationId = loadLocationId == null ? null : loadLocationId.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column LEG.unload_location_id
     *
     * @return the value of LEG.unload_location_id
     *
     * @mbg.generated
     */
    public String getUnloadLocationId() {
        return unloadLocationId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column LEG.unload_location_id
     *
     * @param unloadLocationId the value for LEG.unload_location_id
     *
     * @mbg.generated
     */
    public void setUnloadLocationId(String unloadLocationId) {
        this.unloadLocationId = unloadLocationId == null ? null : unloadLocationId.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column LEG.voyage_number
     *
     * @return the value of LEG.voyage_number
     *
     * @mbg.generated
     */
    public String getVoyageNumber() {
        return voyageNumber;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column LEG.voyage_number
     *
     * @param voyageNumber the value for LEG.voyage_number
     *
     * @mbg.generated
     */
    public void setVoyageNumber(String voyageNumber) {
        this.voyageNumber = voyageNumber == null ? null : voyageNumber.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column LEG.CARGO_ID
     *
     * @return the value of LEG.CARGO_ID
     *
     * @mbg.generated
     */
    public Integer getCargoId() {
        return cargoId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column LEG.CARGO_ID
     *
     * @param cargoId the value for LEG.CARGO_ID
     *
     * @mbg.generated
     */
    public void setCargoId(Integer cargoId) {
        this.cargoId = cargoId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table LEG
     *
     * @mbg.generated
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        LegDO other = (LegDO) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getLoadTime() == null ? other.getLoadTime() == null : this.getLoadTime().equals(other.getLoadTime()))
            && (this.getUnloadTime() == null ? other.getUnloadTime() == null : this.getUnloadTime().equals(other.getUnloadTime()))
            && (this.getLoadLocationId() == null ? other.getLoadLocationId() == null : this.getLoadLocationId().equals(other.getLoadLocationId()))
            && (this.getUnloadLocationId() == null ? other.getUnloadLocationId() == null : this.getUnloadLocationId().equals(other.getUnloadLocationId()))
            && (this.getVoyageNumber() == null ? other.getVoyageNumber() == null : this.getVoyageNumber().equals(other.getVoyageNumber()))
            && (this.getCargoId() == null ? other.getCargoId() == null : this.getCargoId().equals(other.getCargoId()));
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table LEG
     *
     * @mbg.generated
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getLoadTime() == null) ? 0 : getLoadTime().hashCode());
        result = prime * result + ((getUnloadTime() == null) ? 0 : getUnloadTime().hashCode());
        result = prime * result + ((getLoadLocationId() == null) ? 0 : getLoadLocationId().hashCode());
        result = prime * result + ((getUnloadLocationId() == null) ? 0 : getUnloadLocationId().hashCode());
        result = prime * result + ((getVoyageNumber() == null) ? 0 : getVoyageNumber().hashCode());
        result = prime * result + ((getCargoId() == null) ? 0 : getCargoId().hashCode());
        return result;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table LEG
     *
     * @mbg.generated
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", loadTime=").append(loadTime);
        sb.append(", unloadTime=").append(unloadTime);
        sb.append(", loadLocationId=").append(loadLocationId);
        sb.append(", unloadLocationId=").append(unloadLocationId);
        sb.append(", voyageNumber=").append(voyageNumber);
        sb.append(", cargoId=").append(cargoId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}